<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:t="http://tms" xml:lang="en" lang="en">

    <ui:composition>
        <h:panelGroup id="totalTime_#{time.id}">
            <h:panelGroup style="display:#{sessionScopedBean.timeStates[time.id] ? 'none' : ''}">
                <h:outputLabel id="totalTimeLabel_#{time.id}"
                               value="#{time.runTime}"
                               converter="totalTime">
                    <f:ajax event="click" render="totalTime_#{time.id} scriptPanel" listener="#{timeViewBean.totalTimeEventListener}" onerror="ajaxErrorsHandler"/>
                </h:outputLabel>
            </h:panelGroup>

            <h:panelGroup style="display:#{sessionScopedBean.timeStates[time.id] ? '' : 'none'}">
                <h:inputText id="totalTimeInput_#{time.id}"
                               value="#{time.runTime}"
                               converter="totalTime"
                               style="width:35px;" onkeypress="if (event.which == 13) {this.blur(); return false;}">
                    <f:ajax event="blur" render="totalTime_#{time.id} messages weekTotalTime" listener="#{timeViewBean.totalTimeEventListener}" onerror="ajaxErrorsHandler"/>
                </h:inputText>
            </h:panelGroup>
        </h:panelGroup>
    </ui:composition>

</html>